import LoginStore from './login.Store';
import React, { useContext } from 'react';
import UserStore from './user.Store';
import ChannelStore from './channel.Store';

class RootStore {
  constructor() {
    this.loginStore = new LoginStore();
    this.userStore = new UserStore();
    this.channelStore = new ChannelStore();
  }
}

const context = React.createContext(new RootStore());
const useStore = () => useContext(context);

export default useStore;


